<template>
  <div class="table-page-search-wrapper">
    <el-form :model="searchForm" ref="searchForm" label-width="100px" class="demo-ruleForm">
      <el-row :gutter="10">
        <el-col :md="8" :sm="12" :xs="24">
          <el-form-item label="所属业务:">
            <a-select v-model="searchForm.yt" placeholder="请选择所属业务" style="width:100%">
              <a-select-option
                v-for="item in yetaiList"
                :key="item.value"
                :value="item.value"
              >{{item.label}}</a-select-option>
            </a-select>
          </el-form-item>
        </el-col>
        <el-col :md="8" :sm="12" :xs="24">
          <div style="margin-left:30px">
            <a-button type="primary" icon="search" @click="searchAction()">查询</a-button>
            <a-button @click="resetSearch()" icon="delete" style="margin-left: 8px;">重置</a-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
export default {
  name: 'search',
  data() {
    return {
      zhuangtaiList: [
        {
          label: '停用',
          value: 0
        },
        {
          label: '启用',
          value: 1
        }
      ], //zhaungt
      yetaiList: [
        //商品业态
        {
          label: '商超',
          value: 0
        },
        {
          label: '咖吧',
          value: 1
        },
        {
          label: '洗衣',
          value: 2
        },
        {
          label: '家政',
          value: 3
        }
      ],
      searchForm: {},
      djztList: []
    }
  },
  methods: {
    searchAction() {
      //执行搜索
      this.$emit('search')
    },
    resetSearch() {
      this.searchForm = {}
      this.$emit('resetSearch')
    },
    getSearchForm() {
      //获取高级搜索条件
      return {
        ...this.searchForm
      }
    },
    cxsjChange(e) {
      var timeList = [this.formDate(e[0]._d), this.formDate(e[1]._d)]
      this.searchForm.startCxsj = timeList[0]
      this.searchForm.endCxsj = timeList[1]
    }
  }
}
</script>


<style lang="less">
</style>>
